<?php


/**
 * NOTICE OF LICENSE
 *
 * THIS SOURCE FILE IS PART OF EVEBIT'S PRIVATE PROJECT.
 * 
 * DO NOT USE THIS FILE IN OTHER PLACE.
 *
 * @package   App_Sample
 * @author    Cheng Wei <berlios.o@gmail.com>
 * @version   $$Id: IsAllowed.php 1434 2011-06-27 09:51:09Z chen.hao $$
 * @copyright Copyright (c) 2008 Evebit Inc. China (http://www.evebit.com)
 */

/**
 * Get value of backend source
 * 
 * @package   App_Sample
 * @author    Cheng Wei <berlios.o@gmail.com>
 * @version   $$Id: IsAllowed.php 1434 2011-06-27 09:51:09Z chen.hao $$
 */
class Evebit_View_Helper_IsAllowed extends Zend_View_Helper_Abstract {
	
	/**
	 * Get value
	 * 
	 * @return string
	 */
	public function isAllowed($acl,$role,$resource) {
		if($acl->hasRole($role) && $acl->has($resource)) {
			return $acl->isAllowed($role,$resource);
		}
	}

}